Skip to content

Support java 8 Optional for query parameter #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

WellingR
Copy link

Spring automatically treats query parameters as optional if they are wrapped in Optional<T> however I notices that this was not shown in the api docs.

This change ensures that a @RequestParam is marked not required if the type of the parameter is wrapped in Optional

@bnasslahsen
Copy link
Collaborator

Thank you @WellingR for your contribution.
Your PR is merged with master and will be available on the next release: v1.2.29

@bnasslahsen bnasslahsen added the enhancement New feature or request label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants